ScaleButton: make the popup transient to the button's window
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 11 Dec 2013 14:49:08 +0000 (15:49 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 14 Dec 2013 20:49:38 +0000 (15:49 -0500)
Fixes the popup positioning on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=720256

gtk/gtkscalebutton.c

index 07f14de0f2669ac4876c4c3ac6c6cab03f048a29..03491b0d5df6040d91cec694456a01ebfc326cc6 100644 (file)
@@ -911,6 +911,9 @@ gtk_scale_popup (GtkWidget *widget,
   x += allocation.x;
   y += allocation.y;
 
+  gtk_window_set_transient_for (GTK_WINDOW (priv->dock),
+                                GTK_WINDOW (gtk_widget_get_toplevel (widget)));
+
   if (priv->orientation == GTK_ORIENTATION_VERTICAL)
     gtk_window_move (GTK_WINDOW (priv->dock), x, y - (SCALE_SIZE / 2));
   else